﻿@{
    ViewBag.Title = "Index";
}

    <h2>Index</h2>
    <div>
        @using (Html.BeginForm())
           {
        <fieldset>
            <label for="Filter">
                Filter:</label>
            @Html.TextBox("Filter")
            <input type="submit" value="Filter" />
            @Html.ActionLink("Show All", "Index")
        </fieldset>
        }
    </div>

    <table>
        <tr>
            <th></th>
            <th>
                Id
            </th>
            <th>
                ContentItemRecordId
            </th>
            <th>
                Text
            </th>
            <th>
                Format
            </th>
            <th>
            </th>
        </tr>

    @foreach (var item in Model) 
    {    
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit", new {  id = item.Id })
                |
                @Html.ActionLink("Details", "Details", new { id = item.Id })
            </td>
            <td>
                @Html.Encode(item.Id)
            </td>
            <td>
                @Html.Encode(item.ContentItemRecord_id)
            </td>
            <td>
                @Html.Raw(item.Text)
            </td>
            <td>
                @Html.Encode(item.Format)
            </td>
            <td>
                @Html.ActionLink("Delete", "Delete", new {id = item.Id})
            </td>
        </tr>    
    }

    </table>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
